/*
 * @Author: Xu Peng
 * @Date: 2019-08-13 10:55:28
 * @LastEditors: Xu Peng
 * @LastEditTime: 2019-08-13 10:57:02
 * @Description: 根据路径获取所在页面的权限
 */
import { getRoute } from "@/authorized"
export default {
  computed: {
    // 注入匹配路由的权限
    role() {
      const path = this.$route.path.toLowerCase()
      return getRoute(path, this.$store.state.menus) || {}
    }
  }
}
